package com.mes.biz.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mes.common.annotation.Excel;
import com.mes.common.core.domain.BaseEntity;
import com.mes.common.utils.log.annotation.FieldRemark;
import com.mes.common.utils.log.annotation.LogField;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 采购单对象 biz_purchase
 * @author waf
 * @email waf
 * @date 2023-05-25
 */
@Data
public class BizPurchase extends BaseEntity<BizPurchase>
{
    private static final long serialVersionUID = 1L;

    @FieldRemark(name = "采购单编号",field = "purchaseCode")
    private String purchaseCode;

    @FieldRemark(name = "供应商",field = "supplierCode")
    private String supplierCode;

    @FieldRemark(name = "仓库",field = "warehouseId")
    private String warehouseId;

    /** 部门 */
    @FieldRemark(name = "部门",field = "deptId")
    private String deptId;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @FieldRemark(name = "采购日期",field = "purchaseDate")
    private String purchaseDate;

    @FieldRemark(name = "采购金额",field = "purchaseAmount")
    private BigDecimal purchaseAmount;

    @FieldRemark(name = "付款金额",field = "payAmount")
    private BigDecimal payAmount;

    @FieldRemark(name = "租户id",field = "status")
    private String tenantId;

    @FieldRemark(name = "审核状态",field = "status")
    private Integer status;

    private String supplierName;
    private String warehouseName;
    private String deptName;
    private String createByName;
    private String startDate;
    private String endDate;
    private String condition;

    private List<BizPurchaseDetail> detailList = new ArrayList<>();

    private List<BizPayable> payList = new ArrayList<>();

}
